package com.lsl.内部类;

import cn.hutool.core.util.StrUtil;
import cn.hutool.http.webservice.SoapClient;
import com.sun.org.apache.bcel.internal.generic.NEW;

import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author lishuailong
 * @create 2020-06-11 14:42
 */
public class test1 {
    public static void main(String[] args) {

        //非静态内部类实例化
        Person.Brain1 brain1 = new Person("2333", 1).new Brain1(1);
        brain1.introduce();

        //静态内部类实例化
        Person.Brain2 brain2 = new Person.Brain2(2);
        brain2.introduce();
        String string = "abc";
        System.out.println(string.compareToIgnoreCase("abd"));
        StrUtil.split(",","111");
        Map map= new LinkedHashMap();
        map.put("12","123");
}

}

class Person{
     String name;
    int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public Person() {
    }
    //非静态成员内部类
    class Brain1{
        int weight;

        public Brain1(int weight) {
            this.weight = weight;
        }
        public void introduce(){
            System.out.println("我是"+Person.this.name+"的脑子！");
        }
    }
    static class Brain2{
        int weight;

        public Brain2(int weight) {
            this.weight = weight;
        }
        public void introduce(){
            System.out.println("我是"+"xx"+"的脑子！");
        }
    }
}



